<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?php session_start();
	include_once 'backend/home_page.php';
?>
<html xmlns = "http://www.w3.org/1999/xhtml">
	<head>
		<title>
			Home
		</title>
		
		<script type="text/javascript" src="scripts/jquery-1.11.1.min.js"></script>	
		<script type="text/javascript" src="scripts/breadcrumb.js"></script>	
		<script type="text/javascript" src="scripts/home.js"></script>
		<link rel="stylesheet" type="text/css" href="css/main.css" />
	</head>
	
	<body>
		<p class="header">Home - Welcome to Sprint Tracker <?php echo $_SESSION['user'];?></p>		
		
		<div class="left">
			<p class="subheader">
				Projects
			</p>
			<p>
				<?php 
					$arrProjects = getListOfProjectsForUser();
					foreach($arrProjects as $project){
						echo "<p><a href=\"projects.php?id=$project[project_id]\">$project[project_name]</a></p>";
					}
				?>
			</p>
			<p>
				<input type="button" id="addProjectButton" value="Add New Project" onclick="addProject()"></input>
			</p>
		</div>
		<div class="right">
			<p class="subheader">
				Tasks
			</p>
			<p>
				<ul>
					<?php 
						$arrTasks = getListOfTasksForUser();
						foreach($arrTasks as $task){
							echo "<li><a href=\"story.php?id=$task[story_id]\">$task[task_name]</a></li>";
						}
					?>
				</ul>
			</p>
		</div>
	</body>
</html>